package com.xinsoft.service;

import com.xinsoft.common.Response;
import com.xinsoft.entity.dto.ApproveDTO;
import com.xinsoft.common.ApprovedParam;
import org.springframework.security.oauth2.provider.approval.Approval;

import java.util.List;
import java.util.Map;

public interface ApproveService {
    /**
     * 提交审批
     *
     * @param approveDTO
     */
    Response<?> submitApprove(ApproveDTO approveDTO);

    /**
     * 审批
     *
     * @param param      审批参数
     * @param sourceType 源单类型
     * @return {@link Response}<{@link ?}>
     */
    Response<?> approved(ApprovedParam param, Integer sourceType);

    void checkParam(ApprovedParam param);

    /**
     * 审批历史记录
     *
     * @param sourceId   源单ID
     * @param sourceType 源单类型
     */
    List<Map<String, Object>> approvalHistory(Integer sourceId, Integer sourceType);
}
